<template name="creator_report">
	<div class="steedos-brand-band slds-brand-band_medium slds-template_bottom-magnet">
		<div class="slds-template__container">
			{{#if reportObject}}
				<div class="reportsReportPage slds-grid slds-grid--vertical filter-list-wraper report-type-{{reportObject.report_type}} {{#if isDesignerOpen}}report-is-designer-open{{/if}}">
					<div class="slds-page-header--object-home slds-page-header_joined slds-page-header_bleed slds-page-header slds-shrink-none test-headerRegion forceListViewManagerHeader">
						<div class="slds-grid">
							<div class="slds-col slds-has-flexi-truncate">
								<div class="slds-media slds-no-space slds-grow">
									<div class="slds-media__figure">
										<span class="slds-icon_container">
											<div class="slds-icon crm-header-icon">
												<span class="uiImage">
													{{> steedos_icon class="slds-icon slds-page-header__icon" source="standard-sprite" name="report"}}
												</span>
											</div>
										</span>
									</div>
									<div class="slds-media__body">
										<nav>
											<ol class="slds-breadcrumb slds-line-height_reset">
												<li class="slds-breadcrumb__item crm-breadcrumb-item">
													<span>{{objectLabel "reports"}}</span>
												</li>
											</ol>
										</nav>
										<h1 class="slds-page-header__title slds-text-color--default slds-p-right--x-small crm-header-title">
											<a class="triggerLink slds-button slds-button--reset slds-type-focus slds-truncate forceListViewPicker" role="button" title="" href="javascript:void(0);" data-toggle="dropdown">
												<div class="triggerLinkTextAndIconWrapper flex">
													<span class="triggerLinkText selectedListView uiOutputText">{{reportObject.name}}</span>
												</div>
											</a>
										</h1>
									</div>
								</div>
							</div>
							<div class="slds-col slds-no-flex slds-grid slds-align-top slds-p-bottom_xx-small">
								{{#if isChartNeedToShow}}
									{{> steedos_button className=(btnToggleChartClass isChartOpen) containerClassName="mr-1" disabled=isChartDisabled
										iconCategory="utility" iconName="chart" variant="icon" title=(_ "creator_report_switch_chart_open")}}
								{{/if}}

								{{> steedos_button className=(btnToggleFilterClass isFiltering isFilterOpen) containerClassName="mr-1"
									iconCategory="utility" iconName="filterList" variant="icon" title=(_ "creator_list_filter")}}

								{{> steedos_button className="slds-button_icon-border-filled btn-refresh" containerClassName="mr-1"
									iconCategory="utility" iconName="refresh" variant="icon" title=(_ "refresh")}}

								<div class="slds-dropdown-trigger slds-dropdown-trigger_click mr-1" aria-expanded="false">
									<div aria-haspopup="true" data-toggle="dropdown">
										{{> steedos_button className="slds-button_icon-more"
											iconCategory="utility" iconName="settings" iconVariant="more" variant="icon" title=(_ "Settings")}}
									</div>
									<div class="dropdown-menu dropdown-menu-right" role="menu">
										<ul class="slds-dropdown__list list-view-controls">
											<li class="slds-dropdown__header" role="separator">
												<span class="slds-text-title--caps">{{_ "Settings"}}</span>
											</li>
											{{#if isBtnSettingsNeedToShow}}
												<li class="slds-dropdown__item btn-settings" role="presentation">
													<a href="javascript:void(0);" class="" role="option" tabindex="-1">
														<span>{{_ "creator_report_dropdown_menu_options"}}</span>
													</a>
												</li>
											{{/if}}
											<li class="slds-dropdown__item btn-export-excel" role="presentation">
												<a href="javascript:void(0);" class="" role="option" tabindex="-1">
													<span>{{_ "creator_report_dropdown_menu_export_excel"}}</span>
												</a>
											</li>
											{{#if isBtnExportPdfNeedToShow}}
												<li class="slds-dropdown__item btn-export-pdf" role="presentation">
													<a href="javascript:void(0);" class="" role="option" tabindex="-1">
														<span>{{_ "creator_report_dropdown_menu_export_pdf"}}</span>
													</a>
												</li>
											{{/if}}
										</ul>
									</div>
								</div>
								{{#if isDesignerNeedToShow}}
									{{#if isSavable}}
										{{> steedos_button className=(btnToggleDesignerClass isDesignerOpen) containerClassName="mr-1"
											iconCategory="utility" iconName="puzzle" variant="icon" title=(_ "creator_report_design_mode")}}
									{{/if}}
								{{/if}}
								<div class="slds-button-group" role="group">
									{{#each actions}}
										<li class="slds-button slds-button--neutral slds-truncate record-action-custom">
											<a href="javascript:void(0);" title="{{this.label}}" class="">
												{{#if this.is_file}}
													{{this.label}}
													<input type="file" name="file" class="input-file-upload" data-parent="{{record._id}}">
												{{else}}
													<div class="slds-truncate" title="{{this.label}}">{{this.label}}</div>
												{{/if}}
											</a>
										</li>
									{{/each}}
									{{#if isSavable}}
										<li class="slds-button slds-button--neutral slds-truncate record-action-save">
											<a href="javascript:void(0);" title="{{_ "Save"}}" class="">
												<div class="slds-truncate" title="{{_ "Save"}}">{{_ "Save"}}</div>
											</a>
										</li>
									{{/if}}
									{{#if moreActions}}
										<div class="slds-dropdown-trigger slds-dropdown-trigger_click slds-button_last">
											<div data-toggle="dropdown" aria-haspopup="true" >
												{{> steedos_button className="slds-button_icon-border-filled" iconCategory="utility" iconName="down" variant="icon" title="Show More"}}
											</div>
											<div class="dropdown-menu dropdown-menu-right crm-header-menu" role="menu">
												<ul class="slds-dropdown__list slds-show">
													{{#each moreActions}}
														<li class="slds-dropdown__item crm-header-menu-item record-action-custom" role="presentation">
															<a href="javascript:void(0);" title="{{this.label}}" class="" role="option" tabindex="-1">
																<span>{{this.label}}</span>
															</a>
														</li>
													{{/each}}
												</ul>
											</div>
										</div>
									{{/if}}
								</div>
							</div>
						</div>
					</div>

					<div class="pageBody {{#if isFilterOpen}}filterOpen{{else}}filterClosed{{/if}}">
						{{> Template.dynamic template="creator_report_content" data=report_content_params}}
						<div class="sidebar {{#if isFilterOpen}}filterOpen{{else}}filterClosed{{/if}} filter-list-container">
							<div class="reportsReportSidebar" data-aura-class="reportsReportSidebar">
								<div class="stackingPanel fadeIn">
									<div class="filterPanelContainer reportsFilterPanel" data-aura-class="reportsFilterPanel">
										<div class="panelHeader">
											<div class="centered-header">
												<button class="slds-button slds-button_neutral btn-filter-cancel {{#unless isFilterDirty}}hidden{{/unless}}" type="button" title="Click to cancel changes">
													{{_ "creator_list_filter_cancel"}}
												</button>
											</div>
											<h2 class="panelTitle centered-header {{#if isFilterDirty}}hidden{{/if}}">{{_ "creator_list_filter"}}
	</h2>
											<div class="centered-header">
												<button class="slds-button slds-button_brand btn-filter-apply {{#unless isFilterDirty}}hidden{{/unless}}" type="button" title="Click to apply changes">
													{{_ "creator_list_filter_apply"}}
												</button>
												{{> steedos_button className=(btnToggleFilterDirtyClass isFilterDirty)
													iconCategory="utility" iconName="forward" iconClassName="slds-button__icon_hint" variant="icon"}}
											</div>
										</div>
										<div class="vert-scroller">
											{{> filter_option_list object_name=reportObject.object_name is_report=true}}
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="filter-option-box">
				</div>
			{{else}}
				{{> notFound}}
			{{/if}}
		</div>
	</div>
</template>
